package com.yudean.esb.dao.erp;

import com.yudean.esb.domain.erp.ErpIdsInsHeaderInt;
import com.yudean.esb.mapper.erp.ErpIdsInsHeaderIntMapper;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by zenghui on 2015-05-18.
 * desc:
 */
@Repository("ErpIdsInsHeaderIntDao")
@Scope("prototype")
public class ErpIdsInsHeaderIntDao {
    private static final String TAG = "ErpIdsInsHeaderIntDao";
    private static final org.slf4j.Logger logger = LoggerFactory.getLogger(ErpIdsInsHeaderIntDao.class);


    @Resource
    private ErpIdsInsHeaderIntMapper erpIdsInsHeaderIntMapper;

    public List<ErpIdsInsHeaderInt> getInsuranceData(String compCodeStr,
                                                     String startDateStr,
                                                     String endDateStr,
                                                     String insTypeStr,
                                                     String insNumberStr) {
        List<ErpIdsInsHeaderInt> list = erpIdsInsHeaderIntMapper.select(compCodeStr,
                startDateStr,
                endDateStr,
                insTypeStr,
                insNumberStr);
        if (null == list || list.size() < 1) {
            return null;
        } else {
            return list;
        }
    }


}
